package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;
import java.util.List;


/**
 * The persistent class for the emp_contract_record database table.
 * 
 */
@Entity
@Table(name="emp_contract_record")
@NamedQuery(name="EmpContractRecord.findAll", query="SELECT e FROM EmpContractRecord e")
public class EmpContractRecord implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="record_id")
	private int recordId;

	@Temporal(TemporalType.DATE)
	@Column(name="apply_date")
	private Date applyDate;

	@Column(name="apply_emp_id")
	private int applyEmpId;

	@Column(name="apply_emp_name")
	private String applyEmpName;

	@Column(name="approve_comments")
	private String approveComments;

	@Temporal(TemporalType.DATE)
	@Column(name="approve_date")
	private Date approveDate;

	@Column(name="approve_dep")
	private String approveDep;

	@Column(name="approve_dep_id")
	private int approveDepId;

	@Column(name="approve_status")
	private byte approveStatus;

	private String approver;

	@Column(name="approver_id")
	private int approverId;

	@Temporal(TemporalType.DATE)
	@Column(name="begin_date")
	private Date beginDate;

	@Temporal(TemporalType.DATE)
	@Column(name="contract_date")
	private Date contractDate;

	@Column(name="contract_describe")
	private String contractDescribe;

	@Column(name="contract_id")
	private String contractId;

	@Column(name="contract_type")
	private String contractType;

	private String dep;

	@Column(name="doc_num")
	private String docNum;

	@Column(name="emp_id")
	private int empId;

	@Column(name="emp_name")
	private String empName;

	@Temporal(TemporalType.DATE)
	@Column(name="end_date")
	private Date endDate;

	private String post;

	@Temporal(TemporalType.DATE)
	@Column(name="probation_over_date")
	private Date probationOverDate;

	private String remark;

	private String tel;

	//bi-directional many-to-one association to EmpContractAttachment
	@OneToMany(mappedBy="empContractRecord")
	@JsonIgnore
	private List<EmpContractAttachment> empContractAttachments;

	public EmpContractRecord() {
	}

	public int getRecordId() {
		return this.recordId;
	}

	public void setRecordId(int recordId) {
		this.recordId = recordId;
	}

	public Date getApplyDate() {
		return this.applyDate;
	}

	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}

	public int getApplyEmpId() {
		return this.applyEmpId;
	}

	public void setApplyEmpId(int applyEmpId) {
		this.applyEmpId = applyEmpId;
	}

	public String getApplyEmpName() {
		return this.applyEmpName;
	}

	public void setApplyEmpName(String applyEmpName) {
		this.applyEmpName = applyEmpName;
	}

	public String getApproveComments() {
		return this.approveComments;
	}

	public void setApproveComments(String approveComments) {
		this.approveComments = approveComments;
	}

	public Date getApproveDate() {
		return this.approveDate;
	}

	public void setApproveDate(Date approveDate) {
		this.approveDate = approveDate;
	}

	public String getApproveDep() {
		return this.approveDep;
	}

	public void setApproveDep(String approveDep) {
		this.approveDep = approveDep;
	}

	public int getApproveDepId() {
		return this.approveDepId;
	}

	public void setApproveDepId(int approveDepId) {
		this.approveDepId = approveDepId;
	}

	public byte getApproveStatus() {
		return this.approveStatus;
	}

	public void setApproveStatus(byte approveStatus) {
		this.approveStatus = approveStatus;
	}

	public String getApprover() {
		return this.approver;
	}

	public void setApprover(String approver) {
		this.approver = approver;
	}

	public int getApproverId() {
		return this.approverId;
	}

	public void setApproverId(int approverId) {
		this.approverId = approverId;
	}

	public Date getBeginDate() {
		return this.beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getContractDate() {
		return this.contractDate;
	}

	public void setContractDate(Date contractDate) {
		this.contractDate = contractDate;
	}

	public String getContractDescribe() {
		return this.contractDescribe;
	}

	public void setContractDescribe(String contractDescribe) {
		this.contractDescribe = contractDescribe;
	}

	public String getContractId() {
		return this.contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public String getContractType() {
		return this.contractType;
	}

	public void setContractType(String contractType) {
		this.contractType = contractType;
	}

	public String getDep() {
		return this.dep;
	}

	public void setDep(String dep) {
		this.dep = dep;
	}

	public String getDocNum() {
		return this.docNum;
	}

	public void setDocNum(String docNum) {
		this.docNum = docNum;
	}

	public int getEmpId() {
		return this.empId;
	}

	public void setEmpId(int empId) {
		this.empId = empId;
	}

	public String getEmpName() {
		return this.empName;
	}

	public void setEmpName(String empName) {
		this.empName = empName;
	}

	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getPost() {
		return this.post;
	}

	public void setPost(String post) {
		this.post = post;
	}

	public Date getProbationOverDate() {
		return this.probationOverDate;
	}

	public void setProbationOverDate(Date probationOverDate) {
		this.probationOverDate = probationOverDate;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getTel() {
		return this.tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public List<EmpContractAttachment> getEmpContractAttachments() {
		return this.empContractAttachments;
	}

	public void setEmpContractAttachments(List<EmpContractAttachment> empContractAttachments) {
		this.empContractAttachments = empContractAttachments;
	}

	public EmpContractAttachment addEmpContractAttachment(EmpContractAttachment empContractAttachment) {
		getEmpContractAttachments().add(empContractAttachment);
		empContractAttachment.setEmpContractRecord(this);

		return empContractAttachment;
	}

	public EmpContractAttachment removeEmpContractAttachment(EmpContractAttachment empContractAttachment) {
		getEmpContractAttachments().remove(empContractAttachment);
		empContractAttachment.setEmpContractRecord(null);

		return empContractAttachment;
	}

}